import Vue from 'vue'
import Vuex from 'vuex'
import createLogger from 'vuex/dist/logger'
import count from './count'
import auth from './auth'
import document from './document'
import ui from './ui'
import application from './application'
import progress from './progress'
import contentBlock from './content-block'
import audioBlocks from './audio-blocks'
import answer from './answer'
import comment from './comment'
import user from './user'
import task from './task'
import notification from './notification'
import blocks from './blocks'
import group from './group'
import member from './member'
import taskCreateSelectGroupStore from '../pages/task-create-select-group/store'
import userGroupCreateStore from '../pages/user-group-create/store'
import courseSelectStore from '../pages/course-select/store'
import exerciseSelectStore from '../pages/exercise-select/store'
import homeworkPreviewStore from '../pages/homework-preview/store'

Vue.use(Vuex)

export default new Vuex.Store({
  plugins: [createLogger()],
  modules: {
    count,
    auth,
    document,
    application,
    progress,
    contentBlock,
    audioBlocks,
    answer,
    comment,
    user,
    task,
    ui,
    blocks,
    group,
    member,
    notification,
    'task-create-select-group': taskCreateSelectGroupStore,
    'user-group-create': userGroupCreateStore,
    'course-select': courseSelectStore,
    'exercise-select': exerciseSelectStore,
    'homework-preview': homeworkPreviewStore,
  }
})
